from sqlalchemy import Column, Integer, Enum, ForeignKey, Text, DateTime
from ..database  import Base

class Dialogue(Base):
    __tablename__ = "dialogues"

    id = Column(Integer, primary_key=True, index=True)
    session_id = Column(Integer, ForeignKey("interview_sessions.id", ondelete="CASCADE"))
    round = Column(Integer, nullable=False)
    speaker = Column(Enum('user', 'system'), nullable=False)
    content = Column(Text)
    timestamp = Column(DateTime)
